package everydayGrade.t4;

/**
 * @Author: Siantar
 * @Date: 2023-08-08-22:42
 * @Description: 1.0
 */
public class T1749 {
    public int maxAbsoluteSum(int[] nums) {
        int min = 0, max = 0, sum = 0;
        for (int num : nums) {
            sum += num;
            if (min > sum) min = sum;
            if (max < sum) max = sum;
        }
        return max - min;
    }
}
